<template>
  <div class="title">
    <div class="address">
      <div class="position iconfont icon-dizhiguanli"></div>
      <div class="addres">北京理工大学国防科技园2号楼10层</div>
      <div class="masg iconfont icon-tishi"></div>
    </div>
    <router-link to="/Search">
      <div class="search">
        <div class="sglass iconfont icon-sousuo"></div>
        <input type="text" placeholder="山姆会员商店优惠商品" />
      </div>
    </router-link>
    <div class="figure">
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
        <van-swipe-item v-for="item in list" :key="item.id">
          <img
            :src="item.s_photos[0].path"
            alt=""
            style="width: 100%; height: 100%"
          />
        </van-swipe-item>
      </van-swipe>
    </div>
    <div class="chose">
      <ul>
        <li>
          <img src="../../../assets/超市@1x.svg" alt="" />
          <p>超市便利</p>
        </li>
        <li>
          <img src="../../../assets/菜市场@1x.svg" alt="" />
          <p>菜市场</p>
        </li>
        <li>
          <img src="../../../assets/水果店@1x.svg" alt="" />

          <p>水果店</p>
        </li>
        <li>
          <img src="../../../assets/鲜花@1x.svg" alt="" />

          <p>鲜花绿植</p>
        </li>
        <li>
          <img src="../../../assets/医药健康@1x.svg" alt="" />

          <p>医药健康</p>
        </li>
      </ul>
      <ul>
        <li>
          <img src="../../../assets/家居@1x.svg" alt="" />
          <p>家居时尚</p>
        </li>

        <li>
          <img src="../../../assets/蛋糕@1x.svg" alt="" />
          <p>烘焙蛋糕</p>
        </li>
        <li>
          <img src="../../../assets/签到@1x.svg" alt="" />
          <p>签到</p>
        </li>
        <li>
          <img src="../../../assets/大牌免运@1x.svg" alt="" />
          <p>大牌免运</p>
        </li>
        <li>
          <img src="../../../assets/红包@1x.svg" alt="" />
          <p>红包套餐</p>
        </li>
      </ul>
    </div>
    <div class="fang"></div>
  </div>
</template>

<script setup>
import { ref, reactive } from 'vue';
import { Swipe, SwipeItem } from 'vant';
import { getNotHeader } from '../../../utils/request.js'


let list = ref([])
getNotHeader('/carousel?project_id=24').then(res => {
  console.log(res);
  list.value = res.result
})










</script>

<style lang="scss" scoped>
.title {
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 3.75rem;
}

.address {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  height: 0.55rem;

  .position {
    width: 0.2rem;
    height: 0.19rem;
    font-size: 0.25rem;
    line-height: 0.19rem;
  }

  .addres {
    line-height: 0.22rem;
    font-size: 0.16rem;
    height: 0.22rem;
  }

  .masg {
    width: 0.2rem;
    line-height: 0.192rem;
    height: 0.192rem;
    font-size: 0.25rem;
  }
}

.search {
  position: relative;
  margin: 0.16rem 0 0.12rem;
  width: 3.75rem;
  display: flex;
  justify-content: center;
  align-items: center;

  .sglass {
    position: absolute;
    left: 0.2rem;
    top: 0.08rem;
    width: 0.2rem;
    height: 0.16rem;
    font-size: 0.2rem;
    line-height: 0.16rem;
  }

  input {
    width: 3.39rem;
    height: 0.32rem;
    border: none;
    border-radius: 0.16rem;
    padding-left: 0.2rem;
  }

  ::-webkit-input-placeholder {
    background-color: #f5f5f5;
    font-size: 0.14rem;
    padding-left: 0.18rem;
  }
}

.figure {
  margin-bottom: 0.16rem;
  width: 3.39rem;
  height: 0.86rem;
  background-color: pink;

  .my-swipe .van-swipe-item {
    width: 3.39rem;
    height: 0.86rem;
    color: #fff;
    font-size: 0.2rem;
    line-height: 0.86rem;
    text-align: center;
    background-color: #39a9ed;
  }
}

.chose {
  margin: 0 0 0.16rem;
  width: 3.39rem;

  ul {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;

    li {
      display: flex;
      justify-content: space-between;
      flex-direction: column;
      margin: 0.08rem 0;
      width: 0.48rem;
      height: 0.73rem;

      img {
        margin-left: 0.04rem;
        border-radius: 0.5rem;
      }
      .name {
        width: 0.48rem;
        height: 0.16rem;
        background-color: pink;
      }
    }
  }
}
.fang {
  display: flex;
  margin-bottom: 0.16rem;
  width: 3.75rem;
  height: 0.1rem;
  background-color: #f1f1f1;
}
</style>